package com.whj.servicemap.service.impl;

import com.whj.internalcommon.dto.ResponseResult;
import com.whj.internalcommon.request.PointsRequestDTO;
import com.whj.internalcommon.response.TrackResponse;
import com.whj.servicemap.remote.PointClient;
import com.whj.servicemap.service.PointService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @Auther: wanghaijun
 * @Date: 2023/1/20 - 01 - 20 - 13:02 
 * @Description: com.whj.servicemap.service.impl
 */
@Slf4j
@Service
public class PointServiceImpl implements PointService {

    @Autowired
    private PointClient pointClient;

    /**
     * 调用pointClient服务 上传经纬度坐标 用tid 和 trid
     * @param pointsRequestDTO
     * @return
     */
    @Override
    public ResponseResult upload(PointsRequestDTO pointsRequestDTO) {
        ResponseResult<TrackResponse> upload = pointClient.upload(pointsRequestDTO);
        return upload;
    }
}
